#ifndef _DWMSTATUS_TYPES_H
#define _DWMSTATUS_TYPES_H
#include <string.h>
#include <stddef.h>
#include <sys/param.h>

#define STRING_LENGTH 500
typedef char String[STRING_LENGTH];


static inline void safe_strcat(char *dest, char *src, size_t max_size) {

  strncat(dest, src, MIN(strlen(src), max_size - strlen(dest)));

}

static inline void COPY(char *dest, char *src, size_t max_size) {
  if (src) {
    strncpy(dest, src, max_size);
    dest[max_size - 1] = '\0';
  } else 
    memset(dest, '\0', max_size);
}

typedef void (*InitFunction)();
typedef void (*GetDataFunction)(char *, size_t);

#endif /* end of #ifndef */
